#pragma once

#include <atlddx.h>
#include <atlcrack.h>

#include "resource.h"



class CCostConfigDlg : public CDialogImpl<CCostConfigDlg>,
	public CWinDataExchange<CCostConfigDlg>
{
public:
	CCostConfigDlg(void);
	~CCostConfigDlg(void);

	enum { IDD = IDD_DLG_COST_INTERFACE };

	BEGIN_MSG_MAP(CCostConfigDlg)
		MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
		COMMAND_ID_HANDLER(IDOK, OnCloseCmd)
		COMMAND_ID_HANDLER(IDCANCEL, OnCloseCmd)
		COMMAND_HANDLER_EX(IDC_BTN_CANCEL, BN_CLICKED, OnBtnCancelBnClicked)
		COMMAND_HANDLER_EX(IDC_BTN_OK, BN_CLICKED, OnBtnOkBnClicked)
		COMMAND_HANDLER_EX(IDC_EDIT_IP, EN_CHANGE, OnEditIpEnChange)
		COMMAND_HANDLER_EX(IDC_COMBO_COMPANY, CBN_SELCHANGE, OnComboCompanyCbnSelChange)
	END_MSG_MAP()


protected:

	CComboBox  cbCompany;
	CComboBox  cbScreenMode;
	HWND  m_hStatic;
	HWND  m_hEditIP;

	WCHAR m_szCostServer[512];

public:

	int  OnSelectedCompany(void);

	LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);

	LRESULT OnBtnCancelBnClicked(WORD wNotifyCode, WORD wID, HWND hWndCtl);
	LRESULT OnBtnOkBnClicked(WORD wNotifyCode, WORD wID, HWND hWndCtl);

	LRESULT OnEditIpEnChange(WORD wNotifyCode, WORD wID, HWND hWndCtl);
	LRESULT OnComboCompanyCbnSelChange(WORD wNotifyCode, WORD wID, HWND hWndCtl);
	int ResetDlgText(void);
};


